package com.indusfo.spc.mapper;

import com.indusfo.spc.pojo.MatBom;
import com.indusfo.spc.pojo.OrderBom;

import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author liub
 * @Date 2019/11/26 10:46
 * @Version 1.0
 */
public interface OrderBomMapper {
    /**
     * 新增
     */
    int insertOrderBom(OrderBom orderBom);

    /**
     * 修改
     */
    int updateOrderBom(OrderBom orderBom);

    /**
     * 查询
     */
    List<OrderBom> queryOrderBom(OrderBom orderBom);

    /**
     * 总数
     */
    int countOrderBom(OrderBom orderBom);

    /**
     * 判重
     */
    int checkOrderBom(OrderBom orderBom);

    /**
     * 启停
     */
    int deleteOrderBom(@Param("orderBomIds") List<Integer> orderBomIds, @Param("dataState") Integer dataState);

    /**
     * 级联删除查询
     */
    List<OrderBom> queryOrderBomByOrderFlowId(@Param("orderFlowId") Integer orderFlowId);

    /**
     * 级联删除
     */
    int deleteOrderBomByOrderBomId(@Param("orderBomId") Integer orderBomId, @Param("dataState") Integer dataState);

    int insertOrderBomByMatFlowList(@Param("matBomList") List<MatBom> matBomList);

}